package fr.epsi.activities.absence;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import com.example.MyLittleHotel.R;

/**
 * Created by Florent Baudon on 28/05/2014.
 */
public class AbsenceActivity extends Activity implements View.OnClickListener {

    Button ajouter, consulter;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.absencelayout);

        ajouter = (Button)findViewById(R.id.accesAjoutAbs);
        consulter = (Button)findViewById(R.id.consulterAbs);

        ajouter.setOnClickListener(this);
        consulter.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        if((Button)v==ajouter ){
            Intent a = new Intent(this, AjouterAbsenceActivity.class);
            startActivity(a);
        }
        if((Button)v==consulter ){
            Intent c = new Intent(this, ConsulterAbsenceActivity.class);
            startActivity(c);
        }
    }
}